package com.itheima.demo;



import com.itheima.domain.User;
import com.itheima.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class TextUser {
    public static void main(String[] args) {
        ApplicationContext ac=new ClassPathXmlApplicationContext("spring.xml");
        UserService userService = ac.getBean(UserService.class);
        List<User> all = userService.findAll();
        System.out.println(all);
    }
}
